{% extends 'videos/base.html' %}

{% load pagination_tags i18n markup comments_tags components tagging_tags %}

{% block header %}
    {{ block.super }}{% if tag %}: "{{ tag }}"{% endif %}
{% endblock %}

{% block content %}
    {% for obj in object_list %}
    <article class="entry-post">
        <header class="entry-header">
            <h3 class="entry-title">{{ obj }}</h3>
            <div class="byline">
                <i class="fa fa-clock-o"></i> {{ obj.created|date:'DATE_FORMAT' }} &nbsp;&nbsp;
            </div>
            {% tags_for_object obj as video_tags %}
            {% if video_tags %}
            <div class="entry-meta">
                <i class="fa fa-folder-open"></i>
                {% for video_tag in video_tags %}
                <a href="?tag={{ video_tag|urlencode }}">{{ video_tag }}</a>{% if not forloop.last %}, {% endif %}
                {% endfor %}
            </div>
            {% endif %}
        </header>

        <div class="entry-content">
            <div class="video-wrapper">
                <div class="fluid-width-video-wrapper" style="padding-top: 66.66666666666666%;">
                    {{ obj.video_embed_code|safe }}
                </div>
            </div>
            {{ obj.description|linebreaks }}
        </div>

        <footer class="entry-footer">
            {{ obj.created|pretty_date:'blog' }}
        </footer>
    </article>
    {% endfor %}

    {% if is_paginated %}
        {% paginate %}
    {% endif %}
{% endblock %}
